package com.glink.manage.dto.constructionwork;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.glink.common.serializer.JsonDate3DeSerializer;
import com.glink.common.serializer.JsonDate3Serializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
* @author  qiushaoshan
* @since 2025-01-08
*/
@ApiModel(value = "ConstructionWorkUpdateDTO对象", description = "施工工程-更新入参")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ConstructionWorkUpdateDTO implements Serializable {

    private static final long serialVersionUID = -8490062134486752367L;

    @ApiModelProperty(value = "主键")
    @NotBlank(message = "工程ID不能为空")
    private String objId;

    @ApiModelProperty(value = "项目部ID")
    @NotBlank(message = "项目部不能为空")
    private String projectDepartmentObjId;
    
    @ApiModelProperty(value = "工程名称")
    @Size(max = 200, message = "工程名称不能超过200个字符")
    @NotBlank(message = "工程名称不能为空")
    private String workName;

    @ApiModelProperty(value = "负责人")
    @Size(max = 200, message = "负责人不能超过200个字符")
    private String superintendent;

    @ApiModelProperty(value = "计划工期开始")
    @JsonSerialize(using = JsonDate3Serializer.class)
    @JsonDeserialize(using = JsonDate3DeSerializer.class)
    private Date plannedDurationStart;

    @ApiModelProperty(value = "计划工期结束")
    @JsonSerialize(using = JsonDate3Serializer.class)
    @JsonDeserialize(using = JsonDate3DeSerializer.class)
    private Date plannedDurationEnd;

    @ApiModelProperty(value = "建设状态")
    private String status;

    @ApiModelProperty(value = "工程简介")
    @Size(max = 500, message = "工程简介不能超过500个字符")
    private String introduction;

    @ApiModelProperty(value = "效果图,多个效果图用英文逗号分割")
    private String rendering;
}
